<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"
      th:replace="~{admin/layout :: html(title=${title}, content=~{::content})}">
<head>
    <title>公告表单</title>
</head>
<body>
<div th:fragment="content">
    <form th:action="@{/admin/announcement/save}" th:object="${announcement}" method="post">
        <input type="hidden" th:field="*{id}" />

        <div class="mb-3">
            <label for="title" class="form-label">公告标题</label>
            <input type="text" class="form-control" id="title" th:field="*{title}" required>
        </div>

        <div class="mb-3">
            <label for="content" class="form-label">公告内容</label>
            <textarea class="form-control" id="content" th:field="*{content}" rows="10" required></textarea>
        </div>

        <button type="submit" class="btn btn-primary"><i class="fas fa-save"></i> 保存</button>
        <a href="/admin/announcement" class="btn btn-secondary">取消</a>
    </form>
</div>
</body>
</html> 